<%@ page contentType="text/html;charset=UTF-8"%>
<jsp:directive.include file="/WEB-INF/view/jsp/admin/includes/top.jsp" />
<h3>
	积分类型列表
</h3>
<!-- start user list -->
<ec:table items="page.result" var="creditType" rowsDisplayed="10"
	autoIncludeParameters="true" retrieveRowsCallback="limit"
	action="${ctx}/admin/creditType!list.do">
	<ec:row highlightRow="true">
		<ec:column property="rowcount" cell="rowCount" sortable="false"
			title="序号" width="30" />

		<ec:column property="name" title="积分类型名称" />
		<ec:column property="title" title="积分标题" />
		<ec:column property="available" title="是否有效" width="80"
			sortable="true">
			<c:if test="${creditType.available }">有效</c:if>
			<c:if test="${!creditType.available }">无效</c:if>
		</ec:column>
		<ec:column property="null" title="积分图标" width="60" sortable="false">
			<image src="${ctx }/${creditType.image }" />
		</ec:column>
		<ec:column property="unit" title="积分单位" width="80" sortable="true" />
		<ec:column property="ratio" title="积分兑换比率" width="90" sortable="true" />
		<ec:column property="initValue" title="初始积分" width="80"
			sortable="true" />
		<ec:column property="allowExchangeOut" title="允许兑出" width="80"
			sortable="true">
			<c:if test="${creditType.allowExchangeOut }">是</c:if>
			<c:if test="${!creditType.allowExchangeOut }">否</c:if>
		</ec:column>
		<ec:column property="allowExchangeIn" title="允许兑入" width="80"
			sortable="true">
			<c:if test="${creditType.allowExchangeIn }">是</c:if>
			<c:if test="${!creditType.allowExchangeIn }">否</c:if>
		</ec:column>

		<ec:column property="null" title="动作" sortable="false" width="30"
			viewsAllowed="html">
			<security:authorize ifAnyGranted="ROLE_ADMIN">
				<a href="#" class="ref"
					onclick="javascript:go('${ctx}/admin/creditType!edit.do?id=${creditType.id}');">修改</a>
				<a href="#" class="ref"
					onclick="javascript:go('${ctx}/admin/creditType!delete.do?id=${creditType.id}');">删除</a>
			</security:authorize>
		</ec:column>
	</ec:row>
</ec:table>
<!-- end user list -->
<div id="footer" class="footer">
	<security:authorize ifAnyGranted="ROLE_ADMIN">
		<input type="button" class="button"
			onclick="javascript:go('${ctx}/admin/creditType!input.do');"
			value='增加新积分类型' />
	</security:authorize>
</div>
<jsp:directive.include
	file="/WEB-INF/view/jsp/admin/includes/bottom.jsp" />